Skip to content

Conversation

@RomainLanz
Copy link
Member

@RomainLanz RomainLanz commented Nov 11, 2025

Hey! 👋🏻

This is the first PR to migrate from the AdonisJS encryption module to @boringnode/encryption.

@boringnode/encryption provides support for multiple encryption algorithms and a proper key rotation strategy.

Regarding message signing and verification: I started looking at the MessageVerifier that currently lives inside the encryption module. It might make more sense to move it into the core module instead, and rely on a single SIGN_KEY value in the core (app.ts configuration file). That way, we wouldn't need to instantiate a MessageVerifier for every key used by the encryption module.

For context: I'm not using the encryption module MessageVerifier directly. Only the legacy encryption driver inside the core currently makes use of it (and other part of the framework).

@ThisIsMissEm
Copy link
Contributor

Regarding message signing and verification: I started looking at the MessageVerifier that currently lives inside the encryption module. It might make more sense to move it into the core module instead, and rely on a single SIGN_KEY value in the core (app.ts configuration file). That way, we wouldn't need to instantiate a MessageVerifier for every key used by the encryption module.

One would still be able to create a custom verifier though?

@RomainLanz
Copy link
Member Author

We had an internal discussion with Aman on this topic. After some consideration, we decided to keep the MessageVerifier inside the encryption package, but without coupling it to any specific encryption driver.

Instead, the package will expose the MessageVerifier class so it can be instantiated freely by any consumer. This means the default verifier can be used as-is, and anyone who wants a custom verifier will still be able to create their own instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants